#ifndef _DATA_H
#define	_DATA_H

#include <map>
#include <string>
#include <iostream>
#include "../cfgparser.h"
class Bot;

class Data
{
public:

    Data() : m_bot(0), m_services(0), m_disk_array(0), m_init_disks(0), m_config(0)
    , m_high_load_avg(0), m_low_free_mem(0)
    {
    }

    ~Data()
    {
    }

    void setServices(std::map<std::string, bool> * srv)
    {
        if (srv)
            m_services = srv;
    }

    void setBot(Bot *b)
    {
        if (b) m_bot = b;
    }

    void setDiskArray(std::map<std::string, bool> * darr)
    {
        if (darr) m_disk_array = darr;
    }

    void setInitDisks()
    {
        m_init_disks = true;
    }

    void setHighLoadAvg(bool avg = true)
    {
        m_high_load_avg = avg;
    }

    void setLowFreeMem(bool low = true)
    {
        m_low_free_mem = low;
    }

    void setConfig(CfgParser * config)
    {
        m_config = config;
    }

    const CfgParser * getConfig() const
    {
        return m_config;
    }

    std::map<std::string, bool> * getServices()
    {
        return m_services;
    }

    std::map<std::string, bool> * getDiskArray()
    {
        return m_disk_array;
    }

    Bot * getBot()
    {
        return m_bot;
    }

    bool isHighLoadAvg()
    {
        return m_high_load_avg;
    }

    bool isInitDisks()
    {
        return m_init_disks;
    }

    bool isLowFreeMem()
    {
        return m_low_free_mem;
    }
private:

    Bot * m_bot;
    std::map<std::string, bool> * m_services, * m_disk_array;
    bool m_init_disks;
    CfgParser * m_config;
    bool m_high_load_avg, m_low_free_mem;
};


#endif